armv4t_emu
An emulator for the ARMv4T instruction set, written in Rust.
Initially written as part of iburinoc's Gameboy Advance emulator, armv4t_emu is now a standalone library that's ready to be used in any project that might need it!
At the moment, the crate is almost feature complete, and is capable of running large programs (ostensibly) successfully. See the issue tracker for a list of missing / incomplete features.
Example
use ;
let prog = &;
let mut mem = new_with_data;
let mut cpu = new;
cpu.reg_set;
cpu.reg_set;
while cpu.step
assert_eq!;
Optional Features
There are a couple of optional features that you may want to enable, providing various bits of functionality / debugging enhancements. These are disabled by default, as though they do bloat compile times.
Feature | Description |
---|---|
advanced_disasm |
Uses capstone to disassemble + log instructions. Warning: Substantially increases compile times.* |
serde |
Adds Serialize and Deserialize derives on important types/structs. |
* Instead of debugging emulated code by creating a ad-hoc, application-specific debugger, consider using the gdbstub
crate.
Missing Features
At the moment, this crate's feature set is primarily motivated by whatever functionality it's dependent projects require. As such, there are several features of the ARMv4T instruction set which are not implemented at this time:
- Custom co-processor support (see #3)
- Big-Endian support (see #4)
- Support for "cycle accurate" emulation
- This would be tricky to implement, as
armv4t_emu
isn't an emulator for any particular ARMv4T CPU. - Theoretically, this could be implemented by modifying the public API to accept some kind of platform-specific timing information.
- This would be tricky to implement, as